<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>

<% 
  String nombre = (String) session.getAttribute("sessionNombre");
  String apellidoPaterno = (String) session.getAttribute("sessionApellidoPaterno");
  String apellidoMaterno = (String) session.getAttribute("sessionApellidoMaterno");
%>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="<s:url value="/resource/css/template.css"/>" />
<link rel="stylesheet" href="<s:url value="/resource/css/jquery/ui-lightness/jquery-ui-1.9.2.custom.css"/>" />
<!-- CUSTOMIZE/OVERRIDE THE DEFAULT CSS -->

<style type="text/css">
/* remove padding and scrolling from elements that contain an Accordion OR a content-div */
.ui-layout-center, /* has content-div */ .ui-layout-west,
	/* has Accordion */ .ui-layout-east, /* has content-div ... */
	.ui-layout-east .ui-layout-content { /* content-div has Accordion */
	padding: 0 !important;
	overflow: hidden;
}

.ui-layout-center P.ui-layout-content {
	line-height: 1.4em;
	margin: 0; /* remove top/bottom margins from <P> used as content-div */
}

h3,h4 { /* Headers & Footer in Center & East panes */
	font-size: 1.1em;
	background: #EEF;
	border: 1px solid #BBB;
	border-width: 0 0 1px;
	padding: 7px 10px;
	margin: 0;
}

.ui-layout-east h4 { /* Footer in East-pane */
	font-size: 0.9em;
	font-weight: normal;
	border-width: 1px 0 0;
}
</style>

<script src="<s:url value="/resource/js/jquery/jquery-1.4.4.min.js" />" type="text/javascript"></script>
<script src="<s:url value="/resource/script/main.js" />" type="text/javascript"></script>
<script src="<s:url value="/resource/js/jqgrid/grid.locale-en.js" />" type="text/javascript"></script>
<script src="<s:url value="/resource/js/jqgrid/jquery.jqGrid.min.js" />" type="text/javascript"></script>
<script src="<s:url value="/resource/js/tooltip/jquery.cluetip.all.js" />" type="text/javascript"></script>
<script src="<s:url value="/resource/js/layout/jquery.layout.min.js" />" type="text/javascript"></script>
<fmt:setBundle basename="upc.pilot.resource.messages" var="value" />
<script type="text/javascript">
	$(document).ready(function() {
		$('body').layout({
			applyDefaultStyles : true,
			north__spacing_open : 0
		});
	});
	function f_cerrarCuerpo(){
		$("#div_contenedor").html("");
		$("#lblTitutlo").html("Menu de ingreso");
	}
	function loadMessageHome(id, url,title) {
		url : url;
		$.ajax({
			url : url,
			dataType : "html",
			type : "GET",
			data : "HidMenu=" + id,
			error : function(xhr, ajaxOptions, thrownError) {
				alert("error");
			},
			success : function(datos) {
				$("#lblTitutlo").html(title);
				$("#div_contenedor").html(datos);

			}
		})

	}
</script>

<title><fmt:message key="title.Home" bundle="${value}"/></title>

</head>
<body>
	<div class="ui-layout-center">
		<h3 class="ui-widget-header"><label id="lblTitutlo"><fmt:message key="label.menudeingreso" bundle="${value}"/></label></h3>
		<div id="div_contenedor">
		</div>
	</div>
	<div class="ui-layout-north">
		<div id="logo"><fmt:message key="label.sistemadeentrenimientofamiliar" bundle="${value}"/></div>
		<div>Usuario Registrado : <%=nombre%> <%=apellidoPaterno%> <%=apellidoMaterno%></div>
	</div>
	<div class="ui-layout-west">
		<form action="inicio.html" id="frmHome" method="post">
			<ul id="browser" class="buttonmenu">
				<c:forEach items="${resultado.listaMenu}" var="listamenu">
					<li><a href="#" onclick="javascript: loadMessageHome('${listamenu.codigo}','<s:url value="${listamenu.ruta}"/>','${listamenu.descripcion}');">${listamenu.descripcion}</a></li>
				</c:forEach>
				<li><a href="<s:url value="/CerrarSession"/>">Salir</a></li>
			</ul>
		</form>
	</div>
	<div id="cargando" class="cargando" style="display: none;">
		<img alt="Cargando" src="<s:url value="/resource/images/preloader.gif"/>" />
	</div>
<div id="msjPrincipal"></div>
</body>
</html>